package nowCoder;

import java.util.Scanner;

public class HJ59 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        int[][] xx = new int[x.length()][2];
        for (int i = 0; i < x.length(); i++) {
            char c = x.charAt(i);
            for (int j = 0; j < x.length(); j++) {
                if (xx[j][0] == 0){
                    xx[j][0] = c;
                    xx[j][1] = 1;
                    break;
                }
                if (xx[j][0] == c){
                    xx[j][1] += 1;
                    break;
                }
            }
        }
        for (int i = 0; i < x.length(); i++) {
            if (xx[i][1] == 1){
                System.out.println((char)xx[i][0]);
                return;
            }
        }
        System.out.println(-1);
    }
}
